package com.ruoyi.system.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.*;

import java.util.Date;

import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 归档任务业务对象
 *
 * @author ruoyi
 * @date 2024-12-06
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class ArchiveTaskBo extends BaseEntity {

    /**
     *
     */
    @NotNull(message = "不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 任务名称
     */
    @NotNull(message = "任务名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String name;

    /**
     * 备份类型：1：增量、2：全量
     */
    @NotNull(message = "备份类型不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer backType;

    /**
     * 归档策略
     */
    @NotNull(message = "归档策略不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long strategyId;

    /**
     * 执行周期：1：每天、2：每周、3：每月
     */
    @NotNull(message = "执行周期不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer cycle;

    /**
     * 执行日期：每天：0、每周：1-7、每月：1-31
     */
    @NotNull(message = "执行日期不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer executeDay;

    /**
     * 执行时间，小时：0-23
     */
    @NotNull(message = "执行时间不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer executeHour;

    /**
     * 删除策略：0：备份后立即删除
     */
    @NotNull(message = "删除策略不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer deleteStrategy;

    /**
     * 发布状态：0未发布、1已发布
     */
    @NotNull(message = "发布状态不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer pubStatus;
}
